package cm.tl.pms.entity;

import cm.tl.pms.common.annotation.Excel;
import cm.tl.pms.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 附件对象 biz_attachment
 *
 * @author ruoyi
 * @date 2025-04-09
 */
@TableName("biz_attachment")
public class Attachment extends BaseEntity {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 关联业务主键
     */
    @Excel(name = "关联业务主键")
    private Long refId;

    /**
     * 业务类型
     */
    @Excel(name = "业务类型")
    private Long bizType;

    /**
     * 文件名称
     */
    @Excel(name = "文件名称")
    private String fileName;

    /**
     * 附件类型
     */
    @Excel(name = "附件类型")
    private Long fileType;

    /**
     * 文件类型
     */
    @Excel(name = "文件类型")
    private Long fileSuffixType;

    /**
     * 文件大小(MB)
     */
    @Excel(name = "文件大小(MB)")
    private Long fileSize;

    /**
     * 存储路径
     */
    @Excel(name = "存储路径")
    private String filePath;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private Long status;

    /**
     * 可见状态
     */
    @Excel(name = "可见状态")
    private Long canSee;

    /**
     * 上传时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date uploadTime;

    /**
     * 单位id
     */
    @Excel(name = "单位id")
    private Long deptId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setRefId(Long refId) {
        this.refId = refId;
    }

    public Long getRefId() {
        return refId;
    }

    public void setBizType(Long bizType) {
        this.bizType = bizType;
    }

    public Long getBizType() {
        return bizType;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileType(Long fileType) {
        this.fileType = fileType;
    }

    public Long getFileType() {
        return fileType;
    }

    public void setFileSuffixType(Long fileSuffixType) {
        this.fileSuffixType = fileSuffixType;
    }

    public Long getFileSuffixType() {
        return fileSuffixType;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return status;
    }

    public void setCanSee(Long canSee) {
        this.canSee = canSee;
    }

    public Long getCanSee() {
        return canSee;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("refId", getRefId())
                .append("bizType", getBizType())
                .append("fileName", getFileName())
                .append("fileType", getFileType())
                .append("fileSuffixType", getFileSuffixType())
                .append("fileSize", getFileSize())
                .append("filePath", getFilePath())
                .append("status", getStatus())
                .append("canSee", getCanSee())
                .append("uploadTime", getUploadTime())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("deptId", getDeptId())
                .toString();
    }
}
